package com.ming.pojo;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

//1.封装yml数据到实体类
//2.加载到Spring容器中 @Component
//3.指定加载的数据 @ConfigurationProperties
@Data
@Component
@ConfigurationProperties(prefix = "datasource")
public class MyDataSource {
    private String driver;
    private String url;
    private String username;
    private String password;

}
